import { createStore } from 'vuex'
// 导入vuex持久化的插件
import createPersistedstate from 'vuex-persistedstate'
// 导入三个模块
import user from './modules/user'
import cart from './modules/cart'
import category from './modules/category'
export default createStore({
    modules: {
        user,
        cart,
        category
    },
    plugins: [
        createPersistedstate({
            // 本地仓库的名字
            key: 'erabbit-client-pc-store',
            // 指定存储的模块
            paths: ['user', 'cart']
        })
    ]
})